package com.jl.smartcard.ui;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.console.IConsoleConstants;

public class SmartCardPerspective implements IPerspectiveFactory {

	@Override
	public void createInitialLayout(IPageLayout layout) {

		String editorArea = layout.getEditorArea();
		// LEFT
		IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT,
				0.23f, editorArea);
		//left.addView(SmartCardUI.ID_VIEW_PROJECT);
		// add card list upon the project navigator
//		layout.addView(SmartCardUI.ID_VIEW_CARD_LIST, IPageLayout.TOP, 0.3f,
//				"left");
		left.addView(SmartCardUI.ID_VIEW_CARD_LIST);
		left.addView(IPageLayout.ID_PROJECT_EXPLORER);
		//left.addView(IPageLayout.id_);

		// BOTTOM
		IFolderLayout bottom = layout.createFolder("bottom",
				IPageLayout.BOTTOM, 0.6f, editorArea);
		bottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
		//bottom.addView("org.eclipse.pde.runtime.LogView");

		// RIGHT
		IFolderLayout right = layout.createFolder("right", IPageLayout.RIGHT,
				0.75f, editorArea);
		right.addView(SmartCardUI.ID_VIEW_COMMANDS);
		right.addView(SmartCardUI.ID_VIEW_FILESYSTEM);
		right.addView(IPageLayout.ID_OUTLINE);
	}
}
